package org.ushio.nchu_22201402.service.Impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.ushio.common_module.entity.UserBanTime;
import org.ushio.nchu_22201402.mapper.Admin_UserMapper;
import org.ushio.nchu_22201402.service.Admin_UserService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Admin_UserServiceImpl implements Admin_UserService {
    @Resource
    private Admin_UserMapper adminUserMapper;
    @Override
    public String Ban_Record(String Phone_Number, String Ban_Time, String Ban_Reason) {
        if(adminUserMapper.Ban_Record(Phone_Number,Ban_Time,Ban_Reason))
            return "success";
        else
            return "fail";
    }

    @Override
    public void Ban_User(String Phone_Number) {
        adminUserMapper.Ban_User(Phone_Number);
    }

    @Override
    public List<UserBanTime> ListUserBan() {
        return adminUserMapper.ListUserBan();
    }

    @Override
    public List<UserBanTime> getBanIfo(String Phone_Number) {
        return adminUserMapper.getBanIfo(Phone_Number);
    }

    @Override
    public void releaseUser(String Phone_Number) {
        adminUserMapper.releaseUser(Phone_Number);
    }
}
